package cn.hh.god;


import cn.hh.course.domain.Course;
import cn.hh.god.domain.Buy;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

@FeignClient(value = "COURSE-SERVER",fallbackFactory = BuyFallBack.class)
@RequestMapping("/course")
public interface IBuyClient {
    @GetMapping("/{id}")
    Course getById(@PathVariable("id") Long id);

    @PostMapping("update")
    void updateById(Buy buy);
}
